package utils

import "strings"

// SQLInsertAssembly sql insert assembly
func SQLInsertAssembly(table string, columns *[]string) string {
	var sql = "insert into " + table + "(`"
	var vs string
	for i := range *columns {
		if len(*columns)-1 != i {
			vs += "?,"
		} else {
			vs += "?"
		}
	}
	sql += strings.Join(*columns, "`,`") + "`) values (" + vs + ")"
	return sql
}
